To Create a Report Using the AssetWise Data Model
- Create a report project on the computer where SQL Server Data Tools (SSDT) and AssetWise SSRS Data Provider are installed.
-
Configure your project to point to the Report Server.
- In the Solution Explorer pane, right-click your new project and select Properties.
- Set OverwriteDatasets to True.
- Set OverwriteDataSources to True.
-
Set
TargetServerURL to the Web Service URL
from the Reporting Services Configuration Manager.
If your Report Server is on a different computer, make sure you use the fully qualified domain name of the Report Server computer. For example:
http://mypc.bentley.com/reportservice
-
Click
OK.
-
Add a new shared data source to the project.
-
In the
Solution Explorer pane, under your
project, right-click the
Shared Data Sources folder and select
Add New Data Source.
The Shared Data Source Properties dialog opens.
-
On the
General page, do the following:
- In the Name field, enter a name for the shared data source. For example, MyAssetWiseDataSource
- Set Type to eB Data Model.
- In the
Connection string field, enter the
connection information for the
AssetWise community you want to access.
If using AssetWise Internal authentication, enter:
Server=AssetWiseApplicationServerName; Name=AssetWiseDataSourceName; Integrated Security=false
If using Windows authentication, enter:
Server=AssetWiseApplicationServerName; Name=AssetWiseDataSourceName; Integrated Security=true
For Bentley IMS authentication:
The connection information when using Bentley IMS authentication is normally the same as Windows authentication, which is to set Integrated Security to true. However, to set up the shared data source for Bentley IMS authentication, you first need to set Integrated Security to "false" (as if you would be using eB Internal authentication). Later you will set Integrated Security to "true". But for now, enter the following:
Server=AssetWiseApplicationServerName; Name=AssetWiseDataSourceName; Integrated Security=false
Alternatively, Personal Access Token (PAT) issued by the AssetWise Session Service can be used for Bentley IMS authentication, (see To Get a Personal Access Token (PAT) from AssetWise Session Service). In this case, the report will use the IMS account that owns the PAT to get the AssetWise data:Server=AssetWiseApplicationServerName; Name=AssetWiseDataSourceName; UseIms=true; Access Token=AssetWiseSessionServicePersonalAccessToken
-
On the
Credentials page, do the following:
- If using eB Internal authentication, select Use this user name and password and enter the user name and password of a user account in your AssetWise community.
- If using Windows authentication, select Use Windows Authentication (integrated security).
- For
Bentley IMS authentication:
Just like on the General page, Bentley IMS authentication normally uses integrated security, the same as Windows authentication. However to set up the shared data source for Bentley IMS authentication, on this page you first need to select Use this user name and password and enter the user name and password of a user account in your AssetWise community. Later you will switch the setting on this page to use integrated security.
-
Click
OK.
-
In the
Solution Explorer pane, under your
project, right-click the
Shared Data Sources folder and select
Add New Data Source.
-
Create a report.
- In the Solution Explorer pane, under your project, right-click the Reports folder and select Add New Report.
- When the Report Wizard opens, click Next.
- On the Select the Data Source page, select Shared data source, select the shared data source you just created, then click Next.
-
On the
Design the Query page, enter a query in
the
Query string field. For example:
START WITH Document SELECT Id, Class.Name, Name, State, ApprovalStatus WHERE Id <> 0
You can also click the Query Builder button to open the Query Designer dialog to build and test your query. After you build your query, click the Edit as Text button and then click the exclamation point ! button to test the query. When finished, click OK to add the query to the Query string field.
When finished building your query, click Next.
- On the Select the Report Type page, select Tabular and click Next.
- On the Design the Table page, select all items in the Available fields list and click Details >, then click Finish.
- On the Completing the Report page, enter a name for the report and click Finish.
-
(This step is necessary only if using Bentley IMS authentication)
In the
Solution Explorer pane, open your shared data
source, and on the
General page change the integrated security
setting to
true.
Server=<AssetWiseApplicationServerName>; Name=<AssetWiseDatasourceName>; Integrated Security=true
-
In the
Solution Explorer pane, right-click your
solution and select
Deploy Solution.
If you are using eB Internal or Windows authentication, you are done.
If using Bentley IMS authentication, the Reporting Services Login dialog opens. Continue with the next step.
-
In the
Reporting Services Login dialog,
enter the credentials (email address and PAT) of the administrative Bentley IMS
profile, and then click
OK. See
To Get a Personal Access Token (PAT) from AssetWise Session
Service.
This step assumes that you have already:
- Specified this Bentley IMS profile (email address) as the admin account in SQL Server Reporting Services. This is accomplished in the RSReportServer.config file (see Modify the Report Server's RSReportServer.config File ). The Bentley IMS profile must be specified as the admin account in order for you to be granted permission to deploy.
- Received a Personal Access Token (PAT) from AssetWise Session Service for this Bentley IMS profile.